public class Training01 {
    public static void main(String[] args) {
        for(int i=100;i<1000;i++){
            int w=i/100;
            int y=i/10%10;
            int r=i%10;
            if (i==w*w*w+y*y*y+r*r*r)
                System.out.println(i);
        }
    }
}
